import 'package:dk_flutter_base/dk_ui.dart';

class ButtonWidget extends StatelessWidget {
  final Color backGroundColor;
  final Color borderColor;
  final Color titleColor;
  final String title;
  final Function onTap;
  final double width;
  final double height;
  final BorderRadius borderRadius;

  ButtonWidget(
      {this.backGroundColor = const Color(0xff3DBCC6),
      this.borderColor = const Color(0xff3DBCC6),
      this.titleColor = Colors.white,
      this.title,
      this.onTap,
      this.width,
      this.height,
      this.borderRadius});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        width: width,
        height: height,
        decoration: BoxDecoration(
          color: backGroundColor,
          borderRadius: borderRadius ??
              BorderRadius.all(
                Radius.circular(5),
              ),
          border: Border.all(color: borderColor),
        ),
        child: Center(
          child: Text(
            title,
            style: TextStyle(
              color: titleColor,
              fontSize: 16,
            ),
          ),
        ),
      ),
      onTap: onTap,
    );
  }
}
